/*
package com.wzdigit.wms.raw.service.asn;

import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.wzdigit.framework.Shift;
import com.wzdigit.framework.utils.RedisUtil;
import com.wzdigit.wms.basic.client.Pager;
import com.wzdigit.wms.basic.client.PagerInfo;
import com.wzdigit.wms.basic.client.response.Result;
import com.wzdigit.wms.basic.client.response.basic.LocationApiResponse;
import com.wzdigit.wms.basic.domain.basic.Location;
import com.wzdigit.wms.basic.domain.basic.Warehouse;
import com.wzdigit.wms.basic.domain.dtos.inventory.BindWarehousePositionDto;
import com.wzdigit.wms.basic.domain.dtos.inventory.UpdateInventoryInputDto;
import com.wzdigit.wms.basic.domain.inventory.Goods;
import com.wzdigit.wms.basic.domain.inventory.GoodsLog;
import com.wzdigit.wms.basic.domain.inventory.InvTrans;
import com.wzdigit.wms.basic.enums.*;
import com.wzdigit.wms.basic.mapper.core.basic.LocationMapper;
import com.wzdigit.wms.basic.mapper.core.basic.SkuMapper;
import com.wzdigit.wms.basic.mapper.core.basic.WarehouseMapper;
import com.wzdigit.wms.basic.mapper.core.inventory.GoodsLogMapper;
import com.wzdigit.wms.basic.mapper.core.inventory.GoodsMapper;
import com.wzdigit.wms.basic.service.code.InventoryService;
import com.wzdigit.wms.basic.util.HttpSessionUtil;
import com.wzdigit.wms.raw.client.request.asn.scanup.*;
import com.wzdigit.wms.raw.client.response.asn.scanup.ScanUpNoticeResponse;
import com.wzdigit.wms.raw.client.response.asn.scanup.ScanUpSnResponse;
import com.wzdigit.wms.raw.mapper.asn.ScanUpMapper;
import com.wzdigit.wms.raw.service.asn.report.BindLocService;
import com.wzdigit.wms.raw.service.wmscommon.basic.LocationService;
import com.wzdigit.wms.raw.service.wmscommon.core.GoodsService;
import com.wzdigit.wms.wms.api.basic.WarehouseApi;
import com.wzdigit.wms.wms.api.transfer.RecommendedLocationApi;
import lombok.extern.slf4j.Slf4j;
import net.dreamlu.mica.core.utils.BeanUtil;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;

*/
/**
 * 收料上架Service
 * Created by zyf on 2021/6/17 8:41
 *//*

@Service
@Slf4j
public class ScanUpService {
    private static final Integer ASN_STATUS= AsnHeaderStatusEnum.FINISH.code;
    private static final List<String> ASN_TYPES= Arrays.asList(AsnTypeEnum.R14.code,
            AsnTypeEnum.R11.code,AsnTypeEnum.R12.code,AsnTypeEnum.R13.code);
    private static final Integer PUT_AWAY_FLAG= PutAwayFlagEnum.YES.code;
    private static final Integer WAIT_PUTAWAY= PutAwayStatusEnum.WAIT_PUTAWAY.code;
    private static final Integer ING_PUTAWAY=PutAwayStatusEnum.ING_PUTAWAY.code;
    private static final List<Integer> PUT_AWAY_STATUS= Arrays.asList(
            PutAwayStatusEnum.WAIT_PUTAWAY.code,PutAwayStatusEnum.ING_PUTAWAY.code);

    @Reference(version = "${dubbo.consumers.wms.warehouse.api:1.0.0}", check = false, timeout = 300000)
    private WarehouseApi warehouseApi;
    @Reference(version = "${dubbo.consumers.wms.locinfo.api:1.0.0}", check = false, timeout = 300000)
    private RecommendedLocationApi locationApi;

    @Autowired
    private ScanUpMapper scanUpMapper;
    @Autowired
    private GoodsMapper goodsMapper;
    @Autowired
    private LocationMapper locationMapper;
    @Lazy
    @Autowired
    private WarehouseMapper warehouseMapper;

    @Autowired
    private BindLocService bindLocService;

    //分页显示收料上架主页【上架通知】
    */
/*基本条件
      1.入库单头状态为4，单据类型为[R02&R11&R12&R13]
      2.入库单至少存在一张明细的putaway_flag=1&putaway_status=0/1
     *//*

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public PagerInfo<List<ScanUpNoticeResponse>> searchScanUpNotice(
            String filter,Integer searchFlag, Pager<?> pager){
        List<ScanUpNoticeResponse> nullList=new ArrayList<>();
        //上正式前加上
        if (filter==null){
            PagerInfo<List<ScanUpNoticeResponse>> nullPageInfo = new PagerInfo<>();
            nullPageInfo.setItems(nullList);
            nullPageInfo.setTotalCount(0);
        }
        //去除查询条件空格
        if (filter!=null){
            filter=(filter.replace(" ",""));
        }
        Page<ScanUpNoticeResponse> page = PageHelper.offsetPage(pager.getSkipCount(), pager.getMaxResultCount());
        PagerInfo<List<ScanUpNoticeResponse>> pagerInfo = new PagerInfo<>();

        List<ScanUpNoticeResponse> datas =
                scanUpMapper.selectNotice(ASN_STATUS,ASN_TYPES,PUT_AWAY_FLAG,PUT_AWAY_STATUS,filter);
        if (!CollectionUtil.isEmpty(datas)){
            //设置查询标志位&待上架数量
            datas.stream().forEach(t->{
                t.setSearchFlag(1);
                t.setPutawayQtys(t.getRcvQtys().subtract(t.getWaitQtys()));
            });

        } else {
            pagerInfo.setItems(nullList);
        }
        pagerInfo.setItems(datas);
        pagerInfo.setTotalCount(page.getTotal());
        return pagerInfo;

    }

    //主页跳转扫码页面【请求缓存】
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public ScanUpCommitRequest scanCacheInfo(String asnNo,String skuCode){
        ScanUpCommitRequest cache = this.getSnCacheList(asnNo, skuCode);
        ScanUpCommitRequest result=new ScanUpCommitRequest();
        ScanUpNoticeResponse notice = scanUpMapper.selectNoticeByNoAndCode(asnNo, skuCode);
        result=new ScanUpCommitRequest();
        result.setAsnHeaderId(notice.getAsnHeaderId());
        result.setAsnNo(notice.getAsnNo());
        result.setIsContinue(true);
        result.setSkuId(notice.getSkuId());
        result.setSkuCode(notice.getSkuCode());
        result.setDescCn(notice.getDescCn());
        result.setRcvQtys(notice.getRcvQtys());
        result.setWhsId(notice.getWhsId());
        result.setPutawayQtys(notice.getPutawayQtys());
        result.setNowPutawayQtys(new BigDecimal(0));
        if (cache!=null){
            result.setLocCode(cache.getLocCode());
            result.setIsContinue(cache.getIsContinue());
            if (!CollectionUtil.isEmpty(cache.getScanUpSnList())){
                BigDecimal temp=new BigDecimal(0);
                for (ScanUpSnResponse scanSn : cache.getScanUpSnList()) {
                    temp=temp.add(scanSn.getQty());
                }
                result.setNowPutawayQtys(temp);
                result.setScanUpSnList(cache.getScanUpSnList());
            }
        }

        return result;
    }


    //扫描SN后返回对应货品信息&添加对应缓存信息
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public ScanUpCommitRequest scanSn(ScanUpSnRequest request){
        if(request.getLocCode()==null){
            Shift.fatal("请扫描库位!");
        }
        QueryWrapper<Goods> goodsQueryWrapper=new QueryWrapper<>();
        goodsQueryWrapper.eq("GOODS_SN",request.getScanSn());
        Goods goods = goodsMapper.selectOne(goodsQueryWrapper);
        if (goods==null){
            Shift.fatal("没有对应的SN信息");
        }
        //获取缓存
        ScanUpCommitRequest snCacheList = this.getSnCacheList(request.getAsnNo(), request.getSkuCode());
        if(snCacheList!=null){
            List<ScanUpSnResponse> scanUpSnList = snCacheList.getScanUpSnList();
            if (!CollectionUtil.isEmpty(scanUpSnList)){
                List<String> cacheSnList = scanUpSnList.stream().
                        map(t -> t.getSn()).collect(Collectors.toList());
                if (!CollectionUtil.isEmpty(cacheSnList)){
                    if (cacheSnList.contains(request.getScanSn())){
                        Shift.fatal("扫描重复SN!");
                    }
                }
            }
        }

        //查询对应物料编码的发货单下的货品清单
        List<String> goodsSnList = scanUpMapper.selectSnsByAsnAndSku(request.getAsnNo(), request.getSkuId(),
                PUT_AWAY_FLAG, PUT_AWAY_STATUS);
        if (CollectionUtil.isEmpty(goodsSnList)){
            Shift.fatal("该对应物料编码的发货单下没有待上架的条码，请确认！");
        }
        if (!goodsSnList.contains(request.getScanSn())){
            Shift.fatal("SN["+request.getScanSn()+"]不属于当前入库单，请确认！");
        }
        //校验SN状态
        if (goods.getStatus()==null){
            Shift.fatal("条码["+request.getScanSn()+"]状态不为"+ GoodsStatusEnum.WAIT_UP.enumName+"不能上架，请确认!");
        }
        if (!goods.getStatus().equals(GoodsStatusEnum.WAIT_UP.code)){
            Shift.fatal("条码["+request.getScanSn()+"]状态不为"+ GoodsStatusEnum.WAIT_UP.enumName+"不能上架，请确认!");
        }

        //进行缓存
        ScanUpCommitRequest result = this.setScanCache(request, goods);

        return result;
    }

    //清除SN修改缓存信息[POST请求]
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public ScanUpCommitRequest clearSn(ClearSnRequest request){
        if (request==null){
            Shift.fatal("请选择要清除的条码!");
        }
        List<String> clearSnList = request.getSnList();
        if (CollectionUtil.isEmpty(clearSnList)){
            Shift.fatal("请选择要清除的条码!");
        }
        //获取缓存
        ScanUpCommitRequest cacheList = this.getSnCacheList(request.getAsnNo(), request.getSkuCode());
        if (cacheList==null){
            Shift.fatal("没有发货单号对应的缓存信息!");
        }
        List<ScanUpSnResponse> scanUpSnList = cacheList.getScanUpSnList();
        if (CollectionUtil.isEmpty(scanUpSnList)){
            Shift.fatal("没有扫描条码的缓存信息!");
        }
        List<String> cacheSnList = scanUpSnList.stream().map(t -> t.getSn()).collect(Collectors.toList());
        if (CollectionUtil.isEmpty(cacheSnList)){
            Shift.fatal("没有扫描条码的缓存信息!");
        }
        for (String sn : clearSnList) {
            if (!cacheSnList.contains(sn)){
                Shift.fatal("清除的SN错误!");
            }
        }

        ScanUpNoticeResponse notice = scanUpMapper.selectNoticeByNoAndCode(request.getAsnNo(), request.getSkuCode());
        ScanUpCommitRequest result=new ScanUpCommitRequest();
        result.setAsnHeaderId(notice.getAsnHeaderId());
        result.setAsnNo(notice.getAsnNo());
        result.setIsContinue(cacheList.getIsContinue());
        result.setSkuId(notice.getSkuId());
        result.setSkuCode(notice.getSkuCode());
        result.setDescCn(notice.getDescCn());
        result.setRcvQtys(notice.getRcvQtys());
        result.setPutawayQtys(notice.getPutawayQtys());
        result.setLocCode(cacheList.getLocCode());
        result.setWhsId(notice.getWhsId());


        BigDecimal nowPutawayQty=BigDecimal.ZERO;
        List<ScanUpSnResponse> rertunSnRespone=new ArrayList<>();
        for (ScanUpSnResponse scan : scanUpSnList) {
            if (!clearSnList.contains(scan.getSn())){
                rertunSnRespone.add(scan);
                nowPutawayQty=nowPutawayQty.add(scan.getQty());
            }
        }
        result.setNowPutawayQtys(nowPutawayQty);
        result.setScanUpSnList(rertunSnRespone);
        //更新缓存
        this.insertUpdateCache(request.getAsnNo(),request.getSkuCode(),result);


        return result;
    }

    //扫描库位：whsId入库单主档仓库ID
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public Boolean scanLoc(ScanLocRequest request,HttpServletRequest servletRequest){
        if (request==null){
            Shift.fatal("请扫描库位!");
        }
        String locCode = request.getLocCode();
        Integer whsId = request.getWhsId();
        if (locCode==null){
            Shift.fatal("请扫描库位!");
        }
        //查询上架库位所属仓库
        Integer scanUpWhsId = scanUpMapper.selectWhsIdByLocCode(locCode);
        //校验上架库位所属仓库与发货单主档仓库是否一致
        if (scanUpWhsId==null){
            Shift.fatal("请扫描正确的库位!");
        }
        if (!scanUpWhsId.equals(whsId)){
            QueryWrapper<Warehouse> warehouseQueryWrapper=new QueryWrapper<>();
            warehouseQueryWrapper.eq("WHS_ID", whsId);
            Warehouse warehouse = warehouseMapper.selectOne(warehouseQueryWrapper);
            if (warehouse==null){
                Shift.fatal("库位["+locCode+"]没有配置对应仓库信息!");
            }
            Shift.fatal("库位["+locCode+"]不属于仓库["+warehouse.getWhsCode()+"]，不能跨仓上架");
        }
        //查询用户对应权限的仓库
        String loginName = HttpSessionUtil.getLoginName(servletRequest);
        log.info("收料上架扫描库位操作人："+loginName);
        List<Integer> warehousePerm = warehouseApi.
                getWarehousePerm(loginName);
        log.info("收料上架扫描库位操作人仓库权限："+warehousePerm);
        if (CollectionUtil.isEmpty(warehousePerm)){
            Shift.fatal("用户"+loginName+"没有库位"+locCode+"操作权限!");
        }
        if (!warehousePerm.contains(scanUpWhsId)){
            Shift.fatal("用户"+loginName+"没有库位"+locCode+"操作权限!");
        }

        return true;
    }

    */
/*
        [备注]考虑到rpc远程调用事务回滚问题目前先暂时改成0/2/3/1/4
            ps:目前wms上线，抽取项目可能影响上线，待后期上线没问题以后再进行抽取，再进行上架功能的调整
        功能:提交SN上架
        0.校验基本数据：包括如果累计上架+本次上架数量>入库数量，报错
        1.调用上架服务
            (1)更新WMS_GOODS
            (2)更新库存WMS_INV_LOC&WMS_INV_ZONE
            (3)记录操作日志WMS_SN_LOG
        2.更新收货单明细表WMS_ASN_DTL
            (1)PUTAWAY_QTY&PUTAWAY_QTY_EA+=上架的SN数量QTY
            (2)如果0<PUTAWAY_QTY<RCV_QTY，更新PUTAWAY_STATUS=1；
               如果PUTAWAY_QTY=RCV_QTY，更新PUTAWAY_STATUS=2
        3.更新收货单货品清单WMS_ASN_DTL_GOODS STATUS=2
        4.根据skuCode+asnNo清除缓存
            (1)如果累计上架+本次上架数量=入库数量，清除全部缓存信息
            (2)如果累计上架+本次上架数量<入库数量，清除SN集合的缓存，更新累计上架数量，置空本次上架数量
     *//*

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public Result<?> scanUpCommit(ScanUpCommitRequest request,
                                  HttpServletRequest servletRequest, HttpServletResponse servletResponse)
            throws Exception
    {
        //0.校验数据
        if (request==null){
            Shift.fatal("请扫描SN信息后再选择提交!");
        }
        List<ScanUpSnResponse> snInfoList = request.getScanUpSnList();
        //获取要上架的条码
        if (CollectionUtil.isEmpty(snInfoList)){
            Shift.fatal("请扫描SN信息后再选择提交!");
        }

        List<String> distinctSnList = snInfoList.stream().map(t -> t.getSn()).distinct().collect(Collectors.toList());
        if (distinctSnList.size()<snInfoList.size()){
            Shift.fatal("扫描SN重复，请清除SN!");
        }

        //计算最大可上架数量：入库数量-累计上架数量
        BigDecimal maxPutawayQtys = request.getRcvQtys().subtract(request.getPutawayQtys());
        if ((request.getNowPutawayQtys().compareTo(maxPutawayQtys))==1){
            Shift.fatal("本次最大上架数量为"+maxPutawayQtys);
        }



        //1.根据库位分组上架
        String loginName = HttpSessionUtil.getLoginName(servletRequest);
        Map<String, List<ScanUpSnResponse>> locCollect =
                snInfoList.stream().collect(Collectors.groupingBy(ScanUpSnResponse::getSnLocCode));
        for (Map.Entry<String, List<ScanUpSnResponse>> entry : locCollect.entrySet()) {
            BindWarehousePositionDto scanUpDto=new BindWarehousePositionDto();
            Location loc = locationMapper.selectOneByLocCode(entry.getKey());
            scanUpDto.setDeletePkg(true);
            scanUpDto.setLocId(loc.getLocId());
            List<String> snCollect = entry.getValue().
                    stream().map(t -> t.getSn()).collect(Collectors.toList());
            scanUpDto.setGoodsSns(snCollect);
            bindLocService.bindWareHousePosition(scanUpDto,loginName);
        }

        //查询入库单下对应货品
        List<ScanUpSnResponse> updateAsnDtlList = scanUpMapper.selectAsnDtlGoods(request.getAsnNo(), request.getSkuCode(), distinctSnList);

        //2+3更新收货单信息：查询各个明细行的dtlId,入库数量，上架数量，更新上架数量+本次上架数量&状态
        List<BigDecimal> asnDtlIds = updateAsnDtlList.
                stream().map(t -> t.getAsnDtlId()).distinct().collect(Collectors.toList());
        List<ScanUpAsnDtlRequest> rcvAndPutList = scanUpMapper.selectRcvAndPut(asnDtlIds);
        if(CollectionUtil.isEmpty(rcvAndPutList)){
            Shift.fatal("没有对应入库单明细信息");
        }
        //按明细Id分组【用于计算各明细行的本次上架数量】
        Map<BigDecimal, List<ScanUpSnResponse>> snInfoCollectMap =
                updateAsnDtlList.stream().collect(Collectors.groupingBy(t -> t.getAsnDtlId()));
        //更新收货单明细
        for (ScanUpAsnDtlRequest rcvAndPut : rcvAndPutList) {
            List<ScanUpSnResponse> snInfoCollect = snInfoCollectMap.get(rcvAndPut.getAsnDtlId());
            BigDecimal nowPutawayQtys=new BigDecimal(0);
            for (ScanUpSnResponse snInfo : snInfoCollect) {
                nowPutawayQtys=nowPutawayQtys.add(snInfo.getQty());
            }

            BigDecimal rcvQty = rcvAndPut.getDtlRcvQty();
            BigDecimal putwawyQty = rcvAndPut.getDtlPutwawyQty().add(nowPutawayQtys);

            rcvAndPut.setDtlPutwawyQty(nowPutawayQtys);
            rcvAndPut.setDtlPutwawyQtyEa(nowPutawayQtys);


            if (putwawyQty.compareTo(rcvQty)==0){
                rcvAndPut.setDtlPutawayStatus(PutAwayStatusEnum.FINISH.code);
            }else if (putwawyQty.compareTo(BigDecimal.ZERO)==0){
                rcvAndPut.setDtlPutawayStatus(PutAwayStatusEnum.WAIT_PUTAWAY.code);
            }else {
                rcvAndPut.setDtlPutawayStatus(PutAwayStatusEnum.ING_PUTAWAY.code);
            }

            scanUpMapper.updateAsnDtl(rcvAndPut,loginName,new Date());
        }
        //更新发货单货物
        for (ScanUpSnResponse snInfo : updateAsnDtlList) {
            scanUpMapper.updateAsnDtlGoods(AsnDtlGoodsStatusEnum.HAS_PUTON.code,snInfo,loginName,new Date());
        }

        //4.清除缓存

        request.setPutawayQtys(request.getPutawayQtys().add(request.getNowPutawayQtys()));
        request.setScanUpSnList(null);
        if (request.getPutawayQtys().compareTo(request.getRcvQtys())==0){
            this.deleteCache(request.getAsnNo(),request.getSkuCode());
        }else {
            this.insertUpdateCache(request.getAsnNo(),request.getSkuCode(),request);
        }



        return new Result<>(true, "上架成功",request);
    }

    //扫描SN时封装信息
    private ScanUpCommitRequest setScanCache(ScanUpSnRequest request,Goods goods){
        //查询扫描SN的对应发货明细ID&设置SN信息
        List<ScanUpSnResponse> goodsSnPutList = scanUpMapper.selectGoodsBySn(request.getAsnHeaderId(), request.getScanSn(),
                request.getSkuId(), PUT_AWAY_FLAG, PUT_AWAY_STATUS);
        if (CollectionUtil.isEmpty(goodsSnPutList)){
            Shift.fatal("对应入库单下没有对应条码!");
        }

        //查询缓存信息
        ScanUpCommitRequest cacheCheckInfo = this.getSnCacheList(request.getAsnNo(), request.getSkuCode());
        if (cacheCheckInfo!=null){
            List<ScanUpSnResponse> scanUpSnList = cacheCheckInfo.getScanUpSnList();//获取扫描的条码信息
            if (!CollectionUtil.isEmpty(scanUpSnList)){
                if (scanUpSnList.contains(request.getScanSn())){
                    Shift.fatal("扫描SN重复，请确认!");
                }
            }
        }

        ScanUpNoticeResponse notice = scanUpMapper.selectNoticeByNoAndCode(request.getAsnNo(), request.getSkuCode());
        ScanUpCommitRequest result=new ScanUpCommitRequest();
        //封装信息并以AsnNo+SkuCode为key添加缓存
        result.setAsnHeaderId(request.getAsnHeaderId());
        result.setAsnNo(request.getAsnNo());
        result.setIsContinue(request.getIsContinue());
        result.setSkuId(request.getSkuId());
        result.setSkuCode(request.getSkuCode());
        result.setDescCn(request.getDescCn());
        result.setRcvQtys(notice.getRcvQtys());
        result.setPutawayQtys(notice.getPutawayQtys());
        result.setLocCode(request.getLocCode());
        result.setWhsId(request.getWhsId());

        ScanUpSnResponse temp=new ScanUpSnResponse();
        temp.setQty(goods.getQty());
        temp.setSn(goods.getGoodsSn());
        temp.setScanUpDate(new Date());
        temp.setSnLocCode(request.getLocCode());
        temp.setSnSkuCode(request.getSkuCode());

        List<ScanUpSnResponse> cacheScanSnList = new ArrayList<>();
        if (cacheCheckInfo!=null){
            if (cacheCheckInfo.getScanUpSnList()!=null){
                cacheScanSnList=cacheCheckInfo.getScanUpSnList();
            }
        }
        cacheScanSnList.add(temp);
        BigDecimal tempCount=BigDecimal.ZERO;
        for (ScanUpSnResponse scanUpSnResponse : cacheScanSnList) {
            tempCount=tempCount.add(scanUpSnResponse.getQty());
        }
        result.setNowPutawayQtys(tempCount);
        result.setScanUpSnList(cacheScanSnList);


        this.insertUpdateCache(request.getAsnNo(),request.getSkuCode(),result);

        return result;
    }

    //AsnNo+SkuCode为key查询缓存
    private ScanUpCommitRequest getSnCacheList(String asnNo,String skuCode){
        String key=asnNo+skuCode;
        log.info("key:{}", key);
        ScanUpCommitRequest results=(ScanUpCommitRequest) RedisUtil.get(key);
        return results;
    }

    //AsnNo+SkuCode为key添加缓存
    private void insertUpdateCache(String asnNo,String skuCode,ScanUpCommitRequest request){
        String key=asnNo+skuCode;
        RedisUtil.set(key,request);
    }

    //AsnNo+SkuCode为key删除缓存
    public void deleteCache(String asnNo,String skuCode){
        String key=asnNo+skuCode;
        RedisUtil.delete(key);
    }



}
*/
